1 /*
2 
3 Boost Software License - Version 1.0 - August 17th, 2003
4 
5 Permission is hereby granted, free of charge, to any person or organization
6 obtaining a copy of the software and accompanying documentation covered by
7 this license (the "Software") to use, reproduce, display, distribute,
8 execute, and transmit the Software, and to prepare derivative works of the
9 Software, and to permit third-parties to whom the Software is furnished to
10 do so, all subject to the following:
11 
12 The copyright notices in the Software and this entire statement, including
13 the above license grant, this restriction and the following disclaimer,
14 must be included in all copies of the Software, in whole or in part, and
15 all derivative works of the Software, unless such copies or derivative
16 works are solely in the form of machine-executable object code generated by
17 a source language processor.
18 
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
22 SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
23 FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
24 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25 DEALINGS IN THE SOFTWARE.
26 
27 */ 
28 
29 module derelict.purple._debug;
30 
31 import derelict.glib.gtypes;
32 import derelict.glib.glibconfig;
33 
34 extern (C):
35 
36 alias _Anonymous_0 PurpleDebugLevel;
37 alias _Anonymous_1 PurpleDebugUiOps;
38 
39 enum _Anonymous_0
40 {
41 	PURPLE_DEBUG_ALL = 0,
42 	PURPLE_DEBUG_MISC = 1,
43 	PURPLE_DEBUG_INFO = 2,
44 	PURPLE_DEBUG_WARNING = 3,
45 	PURPLE_DEBUG_ERROR = 4,
46 	PURPLE_DEBUG_FATAL = 5
47 }
48 
49 struct _Anonymous_1
50 {
51 	void function (PurpleDebugLevel, const(char)*, const(char)*) print;
52 	gboolean function (PurpleDebugLevel, const(char)*) is_enabled;
53 	void function () _purple_reserved1;
54 	void function () _purple_reserved2;
55 	void function () _purple_reserved3;
56 	void function () _purple_reserved4;
57 }
58 
59 
60 version(Derelict_Link_Static)
61 {
62     extern( C ) nothrow 
63     {
64 	    void purple_debug(PurpleDebugLevel level, const(char)* category, const(char)* format, ...);
65         void purple_debug_misc(const(char)* category, const(char)* format, ...);
66         void purple_debug_info(const(char)* category, const(char)* format, ...);
67         void purple_debug_warning(const(char)* category, const(char)* format, ...);
68         void purple_debug_error(const(char)* category, const(char)* format, ...);
69         void purple_debug_fatal(const(char)* category, const(char)* format, ...);
70         void purple_debug_set_enabled(gboolean enabled);
71         gboolean purple_debug_is_enabled();
72         void purple_debug_set_verbose(gboolean verbose);
73         gboolean purple_debug_is_verbose();
74         void purple_debug_set_unsafe(gboolean unsafe);
75         gboolean purple_debug_is_unsafe();
76         void purple_debug_set_ui_ops(PurpleDebugUiOps* ops);
77         PurpleDebugUiOps* purple_debug_get_ui_ops();
78         void purple_debug_init();
79     }
80 }
81 else
82 {
83     extern( C ) nothrow 
84     {
85 	    alias da_purple_debug = void function(PurpleDebugLevel level, const(char)* category, const(char)* format, ...);			
86         alias da_purple_debug_misc = void function(const(char)* category, const(char)* format, ...);							
87         alias da_purple_debug_info = void function(const(char)* category, const(char)* format, ...);							
88         alias da_purple_debug_warning = void function(const(char)* category, const(char)* format, ...);							
89         alias da_purple_debug_error = void function(const(char)* category, const(char)* format, ...);							
90         alias da_purple_debug_fatal = void function(const(char)* category, const(char)* format, ...);							
91         alias da_purple_debug_set_enabled = void function(gboolean enabled);													
92         alias da_purple_debug_is_enabled = gboolean function();																	
93         alias da_purple_debug_set_verbose = void function(gboolean verbose);													
94         alias da_purple_debug_is_verbose = gboolean function();																	
95         alias da_purple_debug_set_unsafe = void function(gboolean unsafe);														
96         alias da_purple_debug_is_unsafe = gboolean function();																	
97         alias da_purple_debug_set_ui_ops = void function(PurpleDebugUiOps* ops);												
98         alias da_purple_debug_get_ui_ops = PurpleDebugUiOps* function();														
99         alias da_purple_debug_init = void function();		
100     }
101 
102     __gshared
103     {
104 	    da_purple_debug purple_debug;
105 	    da_purple_debug_misc purple_debug_misc;
106 	    da_purple_debug_info purple_debug_info;
107 	    da_purple_debug_warning purple_debug_warning;
108 	    da_purple_debug_error purple_debug_error;
109 	    da_purple_debug_fatal purple_debug_fatal;
110 	    da_purple_debug_set_enabled purple_debug_set_enabled;
111 	    da_purple_debug_is_enabled purple_debug_is_enabled;
112 	    da_purple_debug_set_verbose purple_debug_set_verbose;
113 	    da_purple_debug_is_verbose purple_debug_is_verbose;
114 	    da_purple_debug_set_unsafe purple_debug_set_unsafe;
115 	    da_purple_debug_is_unsafe purple_debug_is_unsafe;
116 	    da_purple_debug_set_ui_ops purple_debug_set_ui_ops;
117 	    da_purple_debug_get_ui_ops purple_debug_get_ui_ops;
118 	    da_purple_debug_init purple_debug_init;
119     }
120 }